//
//  YHYmoreHeadCollectionReusableView.m
//  Home
//
//  Created by 杨泓晔 on 16/4/21.
//  Copyright © 2016年 LanJue. All rights reserved.
//

#import "YHYmoreHeadCollectionReusableView.h"

@implementation YHYmoreHeadCollectionReusableView
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.label = [UILabel new];
        self.label.textColor = GH;
        [self addSubview:self.label];
        [self.label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerYWithinMargins.mas_equalTo(self);
            make.centerXWithinMargins.mas_equalTo(self);
            
            
        }];

        self.label.font = [UIFont systemFontOfSize:15.0f];
        self.label.textAlignment = NSTextAlignmentCenter;
        self.label.text = @"输入或者标签，最多6个";
           }
    
    
    
    
    
            UIImageView *leftline = [UIImageView new];
            [self addSubview:leftline];
            [leftline mas_makeConstraints:^(MASConstraintMaker *make) {
                make.centerYWithinMargins.mas_equalTo(self);
                //make.width.mas_equalTo(50 * AUTO_WIDTH);
                make.left.mas_equalTo(72/2 * AUTO_WIDTH);
                make.right.mas_equalTo(self.label.mas_left).offset(- 18 * AUTO_WIDTH);
                make.height.mas_equalTo(5 * AUTO_HEIGHT);
    
            }];
    leftline.image = [UIImage imageNamed:@"leftline"];
    
    
    
    
    UIImageView *rightline = [UIImageView new];
    [self addSubview:rightline];
    [rightline mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerYWithinMargins.mas_equalTo(self);
        //make.width.mas_equalTo(50 * AUTO_WIDTH);
        make.height.mas_equalTo(5 * AUTO_HEIGHT);
        make.left.mas_equalTo(self.label.mas_right).offset(18 * AUTO_WIDTH);
        make.right.mas_equalTo(self).offset(- 72/2 * AUTO_WIDTH);
        
    }];
    rightline.image = [UIImage imageNamed:@"rightline"];

    return self;
    
    
    
}

@end
